//
//  UILabel+Extension.m
//  DeDao
//
//  Created by PEIYANG on 16/9/25.
//  Copyright © 2016年 YP. All rights reserved.
//

#import "UILabel+Extension.h"

@implementation UILabel (Extension)
- (void)setLineSpaces:(NSInteger)spaces stringLabel:(UILabel *)stringLabel{
    NSMutableAttributedString * attributedString1 = [[NSMutableAttributedString alloc] initWithString:stringLabel.text];
    NSMutableParagraphStyle * paragraphStyle1 = [[NSMutableParagraphStyle alloc] init];
    [paragraphStyle1 setLineSpacing:spaces];
    [attributedString1 addAttribute:NSParagraphStyleAttributeName value:paragraphStyle1 range:NSMakeRange(0, [stringLabel.text length])];
    [stringLabel setAttributedText:attributedString1];
    [stringLabel sizeToFit];
}
@end
